global.x = 'x';
/*Function.prototype.call = function (context, ...args) {
  const symbol = Symbol('fn'); // context = fn2
  context[symbol] = this; // this=call  fn2[symbol] = call
  context[symbol](...args); // fn2[symbol](...args)  ->  fn2.call(global)  ->  fn2执行 -> 打印2 和 'x'
  delete context[symbol];
};*/

function fn1(){
  console.log(1);
}

function fn2(){
  console.log(2);
  console.log(this.x); // x
}

fn1.call.call(fn2,global);
/** ↕等价*/
fn1.call.call.call.call.call.call.call.call/*.call...*/(fn2,global/*,...*/); /** → 等同于 fn2.call(global/!*,...*!/)*/
